package com.lantosec.hmrp.modules.system.vo;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.system.entity.SysRole;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.beans.Transient;


/**
 * <p>
 * 用户角色表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysRole对象", description="用户角色表")
public class SysRoleVO extends BaseVO<SysRole> {
    private static final long serialVersionUID = 1L;


    public SysRoleVO(SysRole entity){
        this.roleId = entity.getRoleId();
        this.roleName = entity.getRoleName();
        this.state = entity.getState();
        this.remark = entity.getRemark();
    }

    @Override
    public SysRole convertToEntity(){
        return new SysRole(this);
    }


    @ApiModelProperty(value = "角色ID")
    private String roleId;

    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "状态(0正常，1废止)")
    private Integer state;

    @ApiModelProperty(value = "角色说明")
    private String remark;

    @ApiModelProperty(value = "权限信息")
    @TableField(exist = false)
    private String sysPermissionId;

    @TableField(exist = false)
    @ApiModelProperty(value = "菜单信息")
    private String menuId;



}
